#include <stdio.h>
int main()
{
  int x, y, z;
  printf("所得解如下：\n");
  for (x = 0; x < 20; x++)
    for (y = 0; y < 33; y++)
      for (z = 0; z < 100; z += 3)
      {
        if ((5 * x + 3 * y + z / 3 == 100) && (x + y + z == 100))
        {
          printf("公鸡买 %2d 只，母鸡买 %2d 只，小鸡买 %2d 只\n", x, y, z);
        }
      }
}